package com.cloud.school.bus.teacherhelper.protocol.classmanage;

import java.util.HashMap;

import android.content.Context;
import android.text.TextUtils;

import com.cloud.school.bus.teacherhelper.protocol.ProtocolDef;
import com.cloud.school.bus.teacherhelper.protocol.baserequest.BasePostHttpRequest;

/**
 * 增加学生
 * 
 * @author jiahongfei
 * 
 */
public class AddStudentRequest extends BasePostHttpRequest {

	/**
	 * 增加学生
	 * 
	 * @param context
	 * @param relationship
	 *            和家长之间关系
	 * @param name
	 *            学生姓名
	 * @param tel
	 *            手机号
	 * @param sex
	 *            学生性别1为男 2为女
	 * @param birthday
	 *            学生生日
	 * @param fbody
	 *            学生头像
	 */
	public AddStudentRequest(Context context, String relationship, String name,
			String tel, String sex, String birthday, String fbody) {
		super(context);

		HashMap<String, String> requestMap = new HashMap<String, String>();
		if (!TextUtils.isEmpty(relationship)) {
			requestMap.put("relationship", relationship);
		}
		if (!TextUtils.isEmpty(name)) {
			requestMap.put("name", name);
		}
		if (!TextUtils.isEmpty(tel)) {
			requestMap.put("tel", tel);
		}
		if (!TextUtils.isEmpty(sex)) {
			requestMap.put("sex", sex);
		}
		if (!TextUtils.isEmpty(birthday)) {
			requestMap.put("birthday", birthday);
		}
		if (!TextUtils.isEmpty(fbody)) {
			requestMap.put("fbody", fbody);
		}
		setRequestParam(ProtocolDef.METHOD_Add_Student, requestMap);

	}

}
